#pragma once

#include <olectl.h>
#include "CustomProperty.h"

//using namespace System;
using namespace System::Collections::Generic;

using namespace msclr::com;

namespace DsoFileNET
{
	private ref class CoreUtil abstract sealed
	{
	public:
		static void OpenPropertyStorage(ptr<IPropertySetStorage> %pPropSS, REFFMTID fmtid, bool readOnly, DsoFileNET::FileOpenOptions flags, [System::Runtime::InteropServices::Out] ptr<IPropertyStorage> %ppPropStg);
		static bool ReadProperty(ptr<IPropertyStorage> %pPropStg, PROPSPEC spc, short codePage, [System::Runtime::InteropServices::Out] System::Object^% result);
		generic <typename T>
		static void LoadPropertySetList(ptr<IPropertyStorage> %pPropStg, short %codePage, Dictionary<T, CustomProperty<T>^>^ props);

		//static void ConvertBlobToVarVector(PROPVARIANT *pVarBlob, VARIANT *pVarByteArray);
		//static void ConvertCFPicToOleStdPic(PROPVARIANT *pVarCF, VARIANT *pVarStdPicture);
		//static void WriteProperty(IPropertyStorage* pPropStg, PROPSPEC spc, WORD wCodePage, VARIANT* pvtValue);
		//static bool VarTypeReadable(VARTYPE vt);
		//static void SavePropertySetList(IPropertyStorage *pPropStg, WORD wCodePage, CDsoDocProperty* plist, ULONG *pcSavedItems);
		//static void GetTypeInfoEx(REFGUID rlibid, LCID lcid, WORD wVerMaj, WORD wVerMin, HMODULE hResource, REFGUID rguid, ITypeInfo** ppti);
	};
}